-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow feed URL to be given during sign up #3768
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a test to https://github.com/Seneca-CDOT/telescope/blob/master/src/api/feed-discovery/test/router.test.js as well.
Question: if we allow using a feed URL, does that mean we'll break the back-end, since it thinks the feed URL is the blog URL (HTML) when we add the user?
'application/atom+xml', | ||
'application/x.atom+xml', | ||
'application/x-atom+xml', | ||
'application/json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that the rss-parser
module we use (see https://github.com/rbren/rss-parser) is capable of parsing all of these types. We might want to limit it to valid Atom + RSS only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we limit these here, should we also limit the link types that the getFeedUrls function further down this file checks to get feed urls from blog url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave it for now and circle back if/when it becomes a problem.
Oh, I did not think to look into that. I will check what effect it will have. |
I'm reviewing the code right now and I tried to look at all the places in the backend that uses In In |
f258064
to
c3a903c
Compare
c3a903c
to
011a50e
Compare
Thanks for the info @alexsam29! |
011a50e
to
9aea5ed
Compare
9aea5ed
to
afe70aa
Compare
Return url if a feed url is passed Add tests for isFeedUrl function Fix failing tests Add test for sending feed URL in router.test Fix test expectations running after test environment ends Uncomment afterEach in router.test
afe70aa
to
fd980fa
Compare
09f143b
to
b6e64bd
Compare
94eec21
to
e27efa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on this.
'application/atom+xml', | ||
'application/x.atom+xml', | ||
'application/x-atom+xml', | ||
'application/json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave it for now and circle back if/when it becomes a problem.
Issue This PR Addresses
Resolves #3689
Type of Change
Description
Currently, only a blog URL can be given during signup. Based on this URL, the feed discovery service returns a list of feed URLs.
This has been updated so a feed URL can also be given. The feed discovery service will check if the given URL is a feed URL, and simply return it back.
This URL is checked by performing a get request and comparing the content type header against a list of valid feed URL content types. The list of valid content types is similar to the one used by the
getFeedURLs
method.Currrent:
Updated:
Steps to test the PR
Checklist